import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'
import { PublicEntity } from '@entities/public.entity'

@Entity({
    name: 'sys_file',
    orderBy: { createTime: 'ASC' }
})
export class FileEntity extends PublicEntity {
    @Column({ comment: '文件名称' })
    name: string

    @Column({ name: 'origin_name', comment: '文件原始名' })
    originName: string

    @Column({ comment: '文件后缀名' })
    suffix: string

    @Column({ comment: '大小，单位（KB）'})
    size: number

    @Column({ comment: '文件存放路径' })
    path: string

    @Column({ name: 'sign_hash', select: false, comment: '文件签名hash（由创建时间+修改时间+文件大小）组合,并转为MD5' })
    signHash: string
}
